# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-oauthlib
_pkgname=oauthlib
pkgver=3.1.0
pkgrel=4
pkgdesc='A generic, spec-compliant, thorough implementation of the OAuth request-signing logic.'
url='https://pypi.org/project/oauthlib/#files'
arch=('any')
license=('BSD')
depends=('python2' 'python2-cryptography')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('c295de232e0215532c501d8f0803bd501a15fe89a746179ba4facca878e4927c8c05f07825f483c4a846922fb49d6d89f559a8b49bb72b19903f902d772b790e')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

